#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() {
	int a, b,c=1;
	for (a = 2; ; a++)
	{
		for (b = 2; b <= a; b++)
		{
			if (a % b == 0)break;
			
		}
		if (a == b) {
			c++; printf("%d", a);
		}
		if (c == 2019) { printf("%d", a); break; }
	}
}










